<!--
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2022-12-05 12:22:10
 * @LastEditTime: 2022-12-05 12:33:40
 * @LastEditors: 赵大壮
-->
<template>
    <div class="w-full h-full flex flex-col">
        <div class="w-full flex flex-row justify-between">
            <div class="flex items-center">
                <el-select class="w-w200" v-model="s_subscribe.p_theme_id" placeholder="请选择咨询主题"
                    @change="action_list_subscribe" clearable>
                    <el-option v-for="item in s_expert.list_theme" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
                <el-date-picker class="w-w200 ml-w10" v-model="s_subscribe.p_time" type="date" placeholder="选择日期"
                    value-format="timestamp" @change="action_list_subscribe" clearable>
                </el-date-picker>
            </div>
            <div class="flex items-center">
                <el-button type="primary" class=" bg-cmain_hover " @click="action_export_data(false)">
                    导出本页
                </el-button>
                <el-button type="primary" class=" bg-cmain_hover ml-w10" @click="action_export_data(true)">导出全部
                </el-button>
            </div>
        </div>
        <div class="w-full h-full mt-w20 ">
            <el-table :data="s_subscribe.list_user_subscribe" stripe style="width: 100%; " height="660">
                <el-table-column type="index" label="序号" min-width="10%">
                </el-table-column>
                <el-table-column prop="type" label="咨询主题" min-width="20%">
                </el-table-column>
                <el-table-column prop="visitors" label="来访者姓名" min-width="20%">
                </el-table-column>
                <el-table-column prop="phone" label="来访者电话" min-width="20%">
                </el-table-column>
                <el-table-column prop="time" label="预留信息时间" min-width="20%">
                </el-table-column>
                <el-table-column label="操作" min-width="10%">
                    <template slot-scope="scope">
                        <el-popconfirm title="是否处理该条数据？" icon-color="red" confirm-button-type="text"
                            @confirm="action_do_handler(scope.row.id)" v-if="scope.row.handler == 0">
                            <el-button type="text" slot="reference">处理</el-button>
                        </el-popconfirm>
                        <el-button type="text" disabled v v-else>已处理</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div class="w-full flex items-end justify-center" style="height:7%">
                <el-pagination background layout="prev, pager, next" :total="s_subscribe.m_page.total"
                    :page-size="s_subscribe.m_page.limit" @current-change="action_page_change">
                </el-pagination>
            </div>
        </div>
    </div>
</template>

<script src="./Index.ts"></script>
<style src="./Index.less" lang="less" scoped>

</style>
